<include file="public:top" />
<!--网站设置-->
<body class="body">
<style type="text/css">
    .red {color: #FF5722!important;}
    .green {color: #5FB878!important;}
</style>
<fieldset class="layui-elem-field layui-field-title" style="margin-top:0px;">
    <legend>{$menuid|getmenuname}</legend>
</fieldset>
    <div class="my-btn-box">
     <span class="fl">
            <a class="layui-btn layui-btn-normal" id="btn-add">添加用户组</a>
     </span>
    </div> 
 
<form class="layui-form layui-form-pane" action="">
    <table class="layui-table">
        <colgroup>
            <col width="60">
            <col width="">
            <col width="150">
            <col width="150">
            <col width="150">
            <col width="150">
		</colgroup>
        <thead>
        <tr>
            <th>ID</th>
            <th>{:L('role_name')}</th>
            <th>{:L('role_score')}</th>
            <th>{:L('role_admin')}</th>
             
            <th>{:L('role_status')}</th>
            <th>{:L('operations_manage')}</th>
        </tr>
        </thead>
         <tbody id="userList">
         	<volist name="list" id="val" >
			  <tr>
			    <td>{$val.id}</td>
			    <td>{$val.name}</td>
			    <td>{$val.score}</td>
			    
			    <td><if condition="$val.isAdmin eq 0">否<else/>是</if></td>
			    <td><if condition="$val.status eq 0">否<else/>是</if></td>
			    <td>
                	<if condition="$val.isAdmin eq 1"><a href="{:U('user_role/auth', array('id'=>$val['id'],'menuid'=>$menuid))}" id="auth">{:L('role_auth')}</a> |</if> <a href="javascript:;" class="J_showdialog" data-uri="{:U('user_role/edit', array('id'=>$val['id']))}" data-title="{:L('edit')} - {$val.name}"  data-id="edit" data-width="450" data-height="190" id="edit">{:L('edit')}</a> | 
                    <a href="javascript:;" class="J_confirmurl" data-acttype="ajax" data-uri="{:U('user_role/delete', array('id'=>$val['id']))}" data-msg="{:sprintf(L('confirm_delete_one'),$val['name'])}" id="delete">{:L('delete')}</a>

			    </td>
			  </tr>
		    </volist>
		</tbody>

    </table>
</form>
<div id="test-laypage-demo0">
  <div class="layui-box layui-laypage layui-laypage-default" id="layui-laypage-29">
  {$page}
  </div>
</div>
<script type="text/javascript" src="__PUBLIC__/admin/layui/layui.js"></script>
<script>
layui.use(['layer','jquery','form','element','table'], function () {
    //参数：layui、名称、模块名、主键（删除用）
    //新增弹窗
    Oper.config.add.width = '600px';
    Oper.config.add.height = '460px';

    //编辑弹窗
    Oper.config.edit.width = '600px';
    Oper.config.edit.height = '460px';
    Oper.initList(layui, '会员组', 'user_role', 'id');
});
</script>
</body>
</html>